<?php /* Smarty version Smarty-3.1.12, created on 2016-07-11 14:30:02
         compiled from "D:\phpStudy\WWW\demonew\dm\xycms\onlinechat.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1801757833cead15c55-48876738%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '6dcb54eca98e5047474de721b38e16d54b1ac121' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\demonew\\dm\\xycms\\onlinechat.tpl',
      1 => 1451977848,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1801757833cead15c55-48876738',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'page_charset' => 0,
    'copyright_author' => 0,
    'action' => 0,
    'onlinechat' => 0,
    'volist' => 0,
    'page' => 0,
    'total' => 0,
    'pagecount' => 0,
    'showpage' => 0,
    'flag_checkbox' => 0,
    'orders' => 0,
    'comeurl' => 0,
    'id' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_57833ceae19e21_98403059',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_57833ceae19e21_98403059')) {function content_57833ceae19e21_98403059($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'D:\\phpStudy\\WWW\\demonew\\source\\core\\plugins\\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_smarty_tpl->tpl_vars['page_charset']->value;?>
" />
<title>营销中心</title>
<meta name="author" content="<?php echo $_smarty_tpl->tpl_vars['copyright_author']->value;?>
" />
<link type="text/css" rel="stylesheet" href="xycms/css/admin.css" media="screen" />
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='js/command.js'></script>
<script type="text/javascript" src='../data/editor/kindeditor.js'></script>
</head>
<body>
<?php if ($_smarty_tpl->tpl_vars['action']->value==''){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：营销中心<span>&gt;</span>在线客服</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="xycms_onlinechat.php?action=add" class="btn-general">添加客服</a>在线客服</h3>
	<form action="xycms_onlinechat.php" method="post" name="myform" id="myform" style="margin:0">
	<input type="hidden" name="action" id="action" value="del" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" align="center">
	  <thead class="tb-tit-bg">
	  <tr>
	    <th width="8%"><div class="th-gap">选择</div></th>
		<th width="10%"><div class="th-gap">类型</div></th>
		<th width="15%"><div class="th-gap">帐号</div></th>
		<th width="12%"><div class="th-gap">显示名称</div></th>
		<th width="8%"><div class="th-gap">排序</div></th>
		<th width="8%"><div class="th-gap">状态</div></th>
		<th width="12%"><div class="th-gap">录入时间</div></th>
		<th><div class="th-gap">操作</div></th>
	  </tr>
	  </thead>
	  <tfoot class="tb-foot-bg"></tfoot>
	  <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['onlinechat']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
	  <tr onmouseover="overColor(this)" onmouseout="outColor(this)">
	    <td align="center"><input name="id[]" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
" onclick="checkItem(this, 'chkAll')" /></td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['ontype']==1){?>
		<font color="green">QQ</font>
		<?php }elseif($_smarty_tpl->tpl_vars['volist']->value['ontype']==2){?>
		<font color="blue">淘宝旺旺</font>
		<?php }elseif($_smarty_tpl->tpl_vars['volist']->value['ontype']==3){?>
		<font color="orange">MSN</font>
		<?php }else{ ?>
		<font color="green">Skype</font>
		<?php }?>
		</td>
		<td align="left"><?php echo $_smarty_tpl->tpl_vars['volist']->value['number'];?>
</td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['title'];?>
</td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['orders'];?>
</td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['flag']==0){?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
" value="flagopen" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
" src="xycms/images/no.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
');" style="cursor:pointer;" />
		<?php }else{ ?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
" value="flagclose" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
" src="xycms/images/yes.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
');" style="cursor:pointer;" />	
		<?php }?>
        </td>
		<td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['volist']->value['timeline'],"%Y/%m/%d");?>
</td>
		<td align="center"><a href="xycms_onlinechat.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
&page=<?php echo $_smarty_tpl->tpl_vars['page']->value;?>
" class="icon-edit">编辑</a>&nbsp;&nbsp;<a href="xycms_onlinechat.php?action=del&id[]=<?php echo $_smarty_tpl->tpl_vars['volist']->value['onid'];?>
" onclick="{if(confirm('确定要删除该信息?')){return true;} return false;}" class="icon-del">删除</a></td>
	  </tr>
	  <?php }
if (!$_smarty_tpl->tpl_vars['volist']->_loop) {
?>
      <tr>
	    <td colspan="9" align="center">暂无信息</td>
	  </tr>
	  <?php } ?>
	  <?php if ($_smarty_tpl->tpl_vars['total']->value>0){?>
	  <tr>
		<td align="center"><input name="chkAll" type="checkbox" id="chkAll" onclick="checkAll(this, 'id[]')" value="checkbox" /></td>
		<td class="hback" colspan="7"><input class="button" name="btn_del" type="button" value="删 除" onclick="{if(confirm('确定删除选定信息吗!?')){$('#action').val('del');$('#myform').submit();return true;}return false;}" class="button" />&nbsp;&nbsp;共[ <b><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
</b> ]条记录</td>
	  </tr>
	  <?php }?>
	</table>
	</form>
	<?php if ($_smarty_tpl->tpl_vars['pagecount']->value>1){?>
	<table width='95%' border='0' cellspacing='0' cellpadding='0' align='center' style="margin-top:10px;">
	  <tr>
		<td align='center'><?php echo $_smarty_tpl->tpl_vars['showpage']->value;?>
</td>
	  </tr>
	</table>
	<?php }?>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="add"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：营销中心<span>&gt;</span>在线客服</p></div>
  <div class="main-cont">
	<h3 class="title"><a href="xycms_onlinechat.php" class="btn-general">返回列表</a>添加客服</h3>
    <form name="myform" id="myform" method="post" action="xycms_onlinechat.php" onsubmit='return checkform();'>
    <input type="hidden" name="action" value="saveadd" />
	<table class='table_form'>
	  <tr>
		<td width="70">客服类型 <span class='f_red'>*</span></td>
		<td><select name="ontype" id="ontype"><option value="1">QQ</option><option value="2">淘宝旺旺</option><option value="3">MSN</option><option value="4">Skype</option></select> <span id="dontype" class='f_red'></span></td>
	  </tr>
	  <tr>
		<td>帐号/号码 <span class="f_red">*</span> </td>
		<td><input type="text" name="number" id="number" class="input-txt" /> <span id='dnumber' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td>显示名称<span class="f_red"></span> </td>
		<td><input type="text" name="title" id="title" class="input-txt" /> <span id='dtitle' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td>状态设置 </td>
		<td><?php echo $_smarty_tpl->tpl_vars['flag_checkbox']->value;?>
</td>
	  </tr>
	  <tr>
		<td>排序 <span class="f_red"></span> </td>
		<td><input type="text" name="orders" id="orders" class="input-s" value="<?php echo $_smarty_tpl->tpl_vars['orders']->value;?>
" /> <span id='dorders' class='f_red'></span></td>
	  </tr>

	  <tr>
		<td></td>
		<td><input type="submit" name="btn_save" class="button" value="添加保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="edit"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：营销中心<span>&gt;</span>在线客服</p></div>
  <div class="main-cont">
	<h3 class="title"><a href="xycms_onlinechat.php?<?php echo $_smarty_tpl->tpl_vars['comeurl']->value;?>
" class="btn-general">返回列表</a>编辑客服</h3>
    <form name="myform" id="myform" method="post" action="xycms_onlinechat.php" onsubmit='return checkform();'>
    <input type="hidden" name="action" value="saveedit" />
	<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" />
	<table class='table_form'>
	  <tr>
		<td width="70">客服类型 <span class='f_red'>*</span></td>
		<td>
		<select name="ontype" id="ontype">
		<option value="1"<?php if ($_smarty_tpl->tpl_vars['onlinechat']->value['ontype']==1){?> selected="selected"<?php }?>>QQ</option><option value="2"<?php if ($_smarty_tpl->tpl_vars['onlinechat']->value['ontype']==2){?> selected="selected"<?php }?>>淘宝旺旺</option><option value="3"<?php if ($_smarty_tpl->tpl_vars['onlinechat']->value['ontype']==3){?> selected="selected"<?php }?>>MSN</option><option value="4"<?php if ($_smarty_tpl->tpl_vars['onlinechat']->value['ontype']==4){?> selected="selected"<?php }?>>Skype</option></select> <span id="dontype" class='f_red'></span></td>
	  </tr>
	  <tr>
		<td>帐号/号码 <span class="f_red">*</span> </td>
		<td><input type="text" name="number" id="number" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['onlinechat']->value['number'];?>
" /> <span id='dnumber' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td>显示名称 <span class="f_red"></span> </td>
		<td><input type="text" name="title" id="title" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['onlinechat']->value['title'];?>
" /> <span id='dtitle' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td>状态设置 </td>
		<td><?php echo $_smarty_tpl->tpl_vars['flag_checkbox']->value;?>
</td>
	  </tr>
	  <tr>
		<td>排序 <span class="f_red"></span> </td>
		<td><input type="text" name="orders" id="orders" class="input-s" value="<?php echo $_smarty_tpl->tpl_vars['onlinechat']->value['orders'];?>
" /> <span id='dorders' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td></td>
		<td><input type="submit" name="btn_save" class="button" value="更新保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>

<script type="text/javascript">
function checkform() {
	var t = "";
	var v = "";

	t = "ontype";
	v = $("#"+t).val();
	if(v=="") {
		dmsg("请选择类型", t);
		return false;
	}
	t = "number";
	v = $("#"+t).val();
	if(v=="") {
		dmsg("帐号/号码不能为空", t);
		return false;
	}

	return true;
}
</script>
</body>
</html><?php }} ?>